gridpack::math::BaseLinearSolverInterface< T, I > Class Template Reference

#include <linear_solver_interface.hpp>

Inheritance diagram for gridpack::math::BaseLinearSolverInterface< T, I >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef MatrixT< T, I > MatrixType
typedef VectorT< T, I > VectorType

Public Member Functions

 BaseLinearSolverInterface (void)
 Default constructor.
 ~BaseLinearSolverInterface (void)
 Destructor.
double tolerance (void) const
 Get the solution tolerance.
void tolerance (const double &tol)
 Set the solver tolerance.
int maximumIterations (void) const
 Get the maximum iterations.
void maximumIterations (const int &n)
 Set the maximum solution iterations.
void solve (const VectorType &b, VectorType &x) const
 Solve w/ the specified RHS, put result in specified vector.
void resolve (const VectorType &b, VectorType &x) const
 Solve again w/ the specified RHS, put result in specified vector.
MatrixTypesolve (const MatrixType &B) const
 Solve multiple systems w/ each column of the Matrix a single RHS.

template<typename T, typename I>
class gridpack::math::BaseLinearSolverInterface< T, I >


Member Typedef Documentation

template<typename T, typename I>
typedef MatrixT<T, I> gridpack::math::BaseLinearSolverInterface< T, I >::MatrixType
template<typename T, typename I>
typedef VectorT<T, I> gridpack::math::BaseLinearSolverInterface< T, I >::VectorType

Constructor & Destructor Documentation

template<typename T, typename I>
gridpack::math::BaseLinearSolverInterface< T, I >::BaseLinearSolverInterface ( void   ) 

Default constructor.

template<typename T, typename I>
gridpack::math::BaseLinearSolverInterface< T, I >::~BaseLinearSolverInterface ( void   ) 

Destructor.


Member Function Documentation

template<typename T, typename I>
void gridpack::math::BaseLinearSolverInterface< T, I >::maximumIterations ( const int &  n  ) 

Set the maximum solution iterations.

Parameters:
n new maximum number of iterations
template<typename T, typename I>
int gridpack::math::BaseLinearSolverInterface< T, I >::maximumIterations ( void   )  const

Get the maximum iterations.

Returns:
current maximum number of solution iterations
template<typename T, typename I>
void gridpack::math::BaseLinearSolverInterface< T, I >::resolve ( const VectorType b,
VectorType x 
) const

Solve again w/ the specified RHS, put result in specified vector.

Collective.

Solve a linear system of equations again with a different RHS. This can only be called after solve() has been called once and only if the coefficient matrix has not changed. Vector x should contain the initial solution estimate. The final solution is returned in x.

The communicator x and b must be the same and match that of the coefficient Matrix used for construction. The length of both x and b must the number of columns in the coeffienct Matrix used for constructor or passed the last call to setMatrix(). If these conditions are not met, an exception is thrown.

Parameters:
b Vector containing right hand side of linear system
x solution Vector
template<typename T, typename I>
MatrixType* gridpack::math::BaseLinearSolverInterface< T, I >::solve ( const MatrixType B  )  const

Solve multiple systems w/ each column of the Matrix a single RHS.

Parameters:
B RHS matrix -- each column is used as a RHS Vector
Returns:
dense solution Matrix -- each column is the solution for the corresponding column in B
template<typename T, typename I>
void gridpack::math::BaseLinearSolverInterface< T, I >::solve ( const VectorType b,
VectorType x 
) const

Solve w/ the specified RHS, put result in specified vector.

Collective.

Solve a linear system of equations. When called, Vector x should contain the initial solution estimate. The final solution is returned in x.

The communicator x and b must be the same and match that of the coefficient Matrix used for construction. The length of both x and b must the number of columns in the coeffienct Matrix used for constructor or passed the last call to setMatrix(). If these conditions are not met, an exception is thrown.

Parameters:
b Vector containing right hand side of linear system
x solution Vector
template<typename T, typename I>
void gridpack::math::BaseLinearSolverInterface< T, I >::tolerance ( const double &  tol  ) 

Set the solver tolerance.

Parameters:
tol new solution tolerance
template<typename T, typename I>
double gridpack::math::BaseLinearSolverInterface< T, I >::tolerance ( void   )  const

Get the solution tolerance.

Returns:
current solution tolerance

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 3 Feb 2020 for GridPACK by  doxygen 1.6.1